/*
 * status.c
 *
 *  Created on: 2022年1月28日
 *      Author: Rupert
 */
#include "status.h"

static uint16_t buffer0[MAX_STORAGE_DEPTH];
static uint16_t buffer1[MAX_STORAGE_DEPTH];

StatusStructure status_params = {
		.sample_rate = 10000,
		.sample_cplt_flag = 0,
		.storage_depth = 1024,
		.adc_data = (uint16_t *)buffer0
};

void SwitchADCDataBuffer(void)
{
	if(status_params.adc_data == buffer0)
	{
		status_params.adc_data = buffer1;
	}
	else
	{
		status_params.adc_data = buffer0;
	}
}
